package Problem7;

import java.util.ArrayList;

public class Main {
	
	public static void main(String[] args) {
		ArrayList<Integer> primeNums = new ArrayList<Integer>();
		primeNums.add(2);
		
		for (int i = 2; primeNums.size() < 10001; i++) {
			boolean found = true;
			for (int prime: primeNums) {
				if ((i % prime) == 0){
					found = false;
					break;
				}
			}
			if (found)
				primeNums.add(i);
		}
		
		System.out.println(primeNums.get(primeNums.size() - 1));
	}
	

}
